package com.shass.mybatis.cxf.call;

import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;

public class CallTest {

	public static void main(String[] args) {
		//此处调用jre需要1.8.
		JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
		Client client = dcf.createClient("http://localhost:8090/mybatis/services/userCxfService?wsdl");
		
		try {
			Object[] rst = client.invoke("getUser", "shass");
			System.out.println(rst[0]);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
